package com.jieshen.lesson3;

import java.awt.*;

public class PaintTest {
    public static void main(String[] args) {
        new MyPaint().loadFrame();
    }
}

class MyPaint extends Frame {
    public void loadFrame(){
        setBounds(20,200,600,500);
        setVisible(true);
    }

    @Override
    public void paint(Graphics g) {
        //画笔，需要有颜色
        g.setColor(Color.red);
        g.drawOval(100,100,100,100);
        g.fillOval(150,200,200,200);
        //养成习惯，画笔用完还原到最初的颜色
    }
}
